#include "sdlTTFMonitor.h"
#include "SDL/SDL_ttf.h"

unsigned sdlTTFMonitor::counter = 0;
sdlTTFMonitor* sdlTTFMonitor::instancia = NULL;
sdlMonitor* sdlTTFMonitor::monitorSDL = NULL;

sdlTTFMonitor* sdlTTFMonitor::getInstance(){
	if (instancia == NULL){
		instancia = new sdlTTFMonitor;
		monitorSDL = sdlMonitor::getInstance();
	}
	counter++;
	return instancia;
}
void sdlTTFMonitor::eliminar(){
	counter --;
	if (counter == 0 && instancia != NULL){
		delete instancia;
		sdlMonitor::eliminar();
	}
}

sdlTTFMonitor::sdlTTFMonitor(){
	TTF_Init();
}

sdlTTFMonitor::~sdlTTFMonitor(){
	TTF_Quit();
}

sdlTTFMonitor::sdlTTFMonitor(const sdlTTFMonitor&){}

void sdlTTFMonitor::operator=(const sdlTTFMonitor&){}
